//Test source code for tokenizer function

#include "tokens.cpp"
#include "tokens.hh"

using namespace std;

void PrintTokens(TokensHeader x)
{
    vector<string> T;
    string token;
    string filename;
    unsigned int linenumber;
    unsigned int i;
    unsigned int j;
    for(i=0;i<x.GetSize();i++)
    {
        T=x.GetTokens(i);
        for(j=0;j<T.size();j++)
        {
            token=x.GetTokens(i,j);
            linenumber= x.GetLine(i);
            filename = x.GetFile(i);
            cout<<"Token is: "<<token<<endl;
            cout<<"Line nubmer is: " << linenumber << endl;
            cout<<"Filename is: " <<filename<<endl;
		cout<<endl;
        }
        T.clear();
    }
}
int main()
{
    string x;
    cout<<"input filename: ";
    cin>>x;
    
    TokensHeader T;
    Tokenize(&T,x);    
	PrintTokens(T);
	return 0;
};

